//
//  TTSWidget.h
//  easyTaxi
//  Created by ellenpage on 12-12-14.
//  Copyright (c) 2012年 ellenpage. All rights reserved.
//

#define kWidgetOrigin CGPointMake(0, 0)//科大讯飞空间位置
#define kXunFeiUrl @"http://dev.voicecloud.cn/index.htm"//科大讯飞的语音通讯地址
#define kXunFeiKey @"4f4b32ea"              //科大讯飞的语音key

#import <UIKit/UIKit.h>
#import "iFlyMSC/IFlySynthesizerControl.h"
#import "iFlyMSC/IFlyRecognizeControl.h"

@protocol TTSWidgetDelegate <NSObject>

- (void)getAddress1;

- (void)getAddress2;

- (void)getAddress3;

@end


typedef enum widgetType :NSInteger
{
  synthesizer,recongnizer
} widgetType;

@interface TTSWidget : UIView

@property (retain, nonatomic) IFlySynthesizerControl *synTheSizeControl;
@property (retain, nonatomic) IFlyRecognizeControl   *recognizeControl;

@property (retain, nonatomic) TTSWidget *ttsWidget;
@property (assign, nonatomic) widgetType widgetTypeInt;
@property (retain, nonatomic) NSString *ttsStr;

@property (weak, nonatomic) id<TTSWidgetDelegate>delegate;

//+ (TTSWidget *)sharedInstance;

- (void)createSynthesizerWidgetWithoutView;//产生文字转语音控件,无视图

- (void)createSynthesizerWidget; //产生文字转语音控件

- (void)createRecognizerWidget;  //产生语音转文字控件

- (void)synthesizeVoice:(NSString *)string;

- (void)startRecongnize;

@end
